﻿
@{
    ViewBag.Title = "用户中心";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

    <div class="content">
        <div class="con_body">
            <div class="location">
                <i>&nbsp;</i>
                <span>
                    <a href="/Home/Index">首页</a>
                    <b>&gt;&gt;</b>
                    <a href="/Home/UserCenter">会员中心</a>
                </span>
                <b>&gt;&gt;</b>
                会员首页
            </div>
            <div class="mem_all">



                <link href="./会员中心-康康体检网_files/Comm.css" rel="stylesheet">
                <script src="./会员中心-康康体检网_files/jquery.pagination.js"></script>

                <div class="mem_nav">
                    <dl>
                        <dt>
                            <b>会员中心</b>
                            <i class="down">&nbsp;</i>
                        </dt>
                        <dd>
                            <a href="/Home/UserCenter" class="cur">会员首页</a>
                        </dd>
                    </dl>
                    <dl>
                        <dt>
                            <b>订单管理</b>
                            <i class="down">&nbsp;</i>
                        </dt>
                        <dd>
                            <a href="/Home/MyOrder" class="">个人订单</a>



                        </dd>
                    </dl>
                    <dl>
                        <dt>
                            <b>优惠券</b>
                            <i class="down">&nbsp;</i>
                        </dt>
                        <dd>
                            <a href="/Home/MyPromotion" id="yhqsubnav">优惠券</a>
                        </dd>
                    </dl>
                    <dl>
                        <dt>
                            <b>账户管理</b>
                            <i class="down">&nbsp;</i>
                        </dt>
                        <dd>
                            <a href="/Home/UserSafeSet">安全设置</a>
                            <a href="/Home/UserInfo">个人资料</a>
                            <a href="/Home/Message" id="lblNews">个人消息<i>0</i></a>
                            <a href="/Home/ExaminationPeople">常用联系人</a>
                        </dd>
                    </dl>
                    <dl>
                        <dt>
                            <b>体检报告</b>
                            <i class="down">&nbsp;</i>
                        </dt>
                        <dd>
                            <a href="/Home/Report">报告查询</a>
                        </dd>
                    </dl>

                </div>
                <script>
                    /*右侧公用菜单：先去掉全部选中样式，然后选中当前页面标签*/
                    $("div.mem_nav > dl > dd > a").removeClass("cur");
                    var pageName = '/hy/index.html';
                    $("div.mem_nav > dl > dd > a[href='" + pageName + "']").addClass('cur');

                    $(function () {

                        UpdateCount();

                        //会员左侧导航切换
                        $(".mem_nav dl dt i").click(function () {
                            if ($(this).hasClass("down")) {
                                $(this).removeClass().addClass("up");
                                $(this).parent("dt").next("dd").slideToggle(500);
                            }
                            else {
                                $(this).removeClass().addClass("down");
                                $(this).parent("dt").next("dd").slideToggle(500);
                            }
                        })

                        //获得未读消息数量
                        UpdateNotReadCount();
                    })

                    function UpdateCount() {
                        $.ajax({
                            url: '/Areas/Client/Handler/DDGLHandler.ashx?_=' + Math.random(),
                            type: 'get',
                            dataType: 'json',
                            data: { 'type': 'GetCount' },
                            success: function (result) {
                                if (typeof result !== "undefined" && result !== null && typeof result.ds !== "undefined" && result.ds !== null) {
                                    var ds = result.ds;
                                    if (ds.length > 0) {
                                        $("#count1").html(ds[0].Num);
                                    }
                                    if (ds.length > 1) {
                                        $("#count2").html(ds[1].Num);
                                    }
                                    if (ds.length > 2) {
                                        $("#count3").html(ds[2].Num);
                                    }
                                }
                            }
                        });
                    }

                    function UpdateNotReadCount() {
                        $.ajax({
                            url: '/Areas/Client/Handler/GRTZHandler.ashx?_=' + Math.random(),
                            type: 'get',
                            dataType: 'json',
                            data: { 'action': 'getnotread' },
                            success: function (result) {
                                if (result.flag) {
                                    $("#lblNews i").remove();
                                    $("#lblNews").append("<i>" + result.count + "</i>")
                                }
                            }
                        });
                    }
                </script>

                @RenderBody()

              
            </div>
        </div>
    </div>


 